package com.bjtg.threegoclinet.bean;

import com.bjtg.threegoclinet.util.LattePreference;

/**
 * 通讯接口URL
 * 日期:2017/04/18
 */
public class Constants {

//    你把那个通知地址的galaxy.100mj.com/api_test改为192.168.0.177:8081/api_test/
//    private static String BASE_URL_TEST = "http://192.168.0.177:8081/api_test";
//    private static String BASE_URL_TEST = "http://galaxy.100mj.com/api_test";

    private static String BASE_URL_TEST = "http://galaxy.100mj.com/api_ztest";
    private static String BASE_URL = "http://galaxy.100mj.com/api";

    //心跳接口
    private static String HEARTBEAT = "/devicemnt/heartbeat/rx";
    //用户开门反馈;//
    private static String FEEDBACK = "/scanmnt/userscan/scan/feedback";
    //用户买货关门;//
    private static String CLOSE = "/scanmnt/userclose/close/str";
    // 2017/12/22 增加有正负值得货道信息接口
    private static String USER_CLOSE = "/userclose/close";
    private static String OPERATION_CLOSE = "/staffclose/close";
    //运维人员开门反馈;//
    private static String STAFFSCAN = "/scanmnt/staffscan/scan/feedback";
    //运维人员加货关门;//
    private static String STAFFCLOSE = "/scanmnt/staffclose/close/str";

    public static String getHeartbeat() {
        return LattePreference.getIsOnline(LattePreference.IS_ONLINE) ? BASE_URL + HEARTBEAT :
                BASE_URL_TEST + HEARTBEAT;
    }

    public static String getFeedback() {
        return LattePreference.getIsOnline(LattePreference.IS_ONLINE) ? BASE_URL + FEEDBACK :
                BASE_URL_TEST + FEEDBACK;
    }

    public static String getClose() {
        return LattePreference.getIsOnline(LattePreference.IS_ONLINE) ? BASE_URL + CLOSE :
                BASE_URL_TEST + CLOSE;
    }

    public static String getUserClose() {
        return LattePreference.getIsOnline(LattePreference.IS_ONLINE) ? BASE_URL + USER_CLOSE :
                BASE_URL_TEST + USER_CLOSE;
    }

    public static String getOperationClose() {
        return LattePreference.getIsOnline(LattePreference.IS_ONLINE) ? BASE_URL + OPERATION_CLOSE :
                BASE_URL_TEST + OPERATION_CLOSE;
    }

    public static String getStaffscan() {
        return LattePreference.getIsOnline(LattePreference.IS_ONLINE) ? BASE_URL + STAFFSCAN :
                BASE_URL_TEST + STAFFSCAN;
    }

    public static String getStaffclose() {
        return LattePreference.getIsOnline(LattePreference.IS_ONLINE) ? BASE_URL + STAFFCLOSE :
                BASE_URL_TEST + STAFFCLOSE;
    }
}